package cn.zwx.security.example.common.resp;

import cn.zwx.security.example.entity.SysMenuEntity;
import lombok.Data;
import org.springframework.security.core.GrantedAuthority;

import java.util.Collection;
import java.util.List;

/**
 * @description:
 * @projectName:spring-boot-security-example
 * @see:cn.zwx.security.example.common.resp
 * @author:zhangwenxue
 * @createTime:2021/6/23 21:07
 * @version:1.0
 */
@Data
public class UserInfoResp {

    /**
     * 用户ID
     */
    private Long userId;
    /**
     * 用户名
     */
    private String username;
    /**
     * 状态:NORMAL正常  PROHIBIT禁用
     */
    private String status;


    /**
     * 用户角色
     */
    private Collection<GrantedAuthority> authorities;

    /**
     * 用户权限列表
     */
    private List<SysMenuEntity> menuEntityList;
    /**
     * 账户是否过期
     */
    private boolean isAccountNonExpired = false;
    /**
     * 账户是否被锁定
     */
    private boolean isAccountNonLocked = false;
    /**
     * 证书是否过期
     */
    private boolean isCredentialsNonExpired = false;
    /**
     * 账户是否有效
     */
    private boolean isEnabled = true;
}
